import React, { useEffect } from 'react'
import axios from 'axios';// instance.get('http://localhost')

export default function ProxyCom() {
  useEffect(() => {
    //封装函数
    let getData = async () => {
      let goods = await axios.get('/dev/goods');
      console.log(goods);
    }
    //调用函数
    getData()
  }, []);

  useEffect(() => {
    let getData = async () => {
      //请求的 url
      let url = '/toutiao/hot-event/hot-board/?origin=toutiao_pc&_signature=_02B4Z6wo00f01UOhEQgAAIDBw6PrShcgiD1DhRWAADQosH9E61P7i7BXMWR88cTdYV-tfkXHIjsIpE46gDq5qHiVi86nyrBpAQ2i4BfN5-yTyOUpPTax6paZxxknGZrWi1jbbKeraKnnvjw0ba';
      //发送请求
      let result = await axios.get(url);
      //输出结果
      console.log(result.data);
    }
    getData();
  }, [])

  return (
    <div>3-ProxyCom</div>
  )
}
